package designs.models.observer.example.two;

import java.awt.FlowLayout;

import javax.swing.JFrame;
import javax.swing.JScrollPane;

public class Application extends JFrame {
	private static final long serialVersionUID = -6153019061004583672L;
	public Application() {
		InputTextSubject textSubject = new InputTextSubject();
		ShowWord observer1 = new ShowWord(textSubject);
		ShowDigit observer2 = new ShowDigit(textSubject);
		setLayout(new FlowLayout());
		add(new JScrollPane(textSubject.getTextArea()));
		add(observer1);
		add(observer2);
		setBounds(20, 20, 400, 300);
		setVisible(true);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	
	public static void main(String[] args) {
		new Application();
	}
}
